package com.bdcom.model;

import java.awt.image.BufferedImage;
import java.util.ArrayList;
import java.util.List;

import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.Transient;

/**
 * 画板数据模型
 * @author Guodeqi
 *
 */
public class CanvasModel{
	
	//工程名称
	@Id
	private String projectName;
	// 障碍物集合
	private  List<IBarrier> barriers = new ArrayList<>();
	// 设备集合
	private List<IDevice> devs = new ArrayList<>();
	//背景图路径
	private String backImgPath ="image/test.png";
	//背景图片
	@Transient
	private transient BufferedImage backImg = null;
	//此图实际代表的长宽
	private double mapWidth = 0;
	
	private double mapHeight = 0;
	//设置默认渲染-70dbm以上的范围
	private int minSignToShow=-70;

	private int maxSign=-10;
	
	private int minSign=-85;
	//画板与实际设计图比例
	private double roomPercent=1.0;
	
	
	public String getProjectName() {
		return projectName;
	}

	public void setProjectName(String projectName) {
		this.projectName = projectName;
	}

	public List<IBarrier> getBarriers() {
		return barriers;
	}

	public void setBarriers(List<IBarrier> barriers) {
		this.barriers = barriers;
	}

	public List<IDevice> getDevs() {
		return devs;
	}

	public void setDevs(List<IDevice> devs) {
		this.devs = devs;
	}

	public String getBackImgPath() {
		return backImgPath;
	}

	public void setBackImgPath(String backImgPath) {
		this.backImgPath = backImgPath;
		setBackImg(null);
	}

	public BufferedImage getBackImg() {
		return backImg;
	}

	public void setBackImg(BufferedImage backImg) {
		this.backImg = backImg;
		if(backImg==null)
		{
			setMapWidth(0);
			setMapHeight(0);
		}
	}

	public double getMapWidth() {
		return mapWidth;
	}

	public void setMapWidth(double mapWidth) {
		this.mapWidth = mapWidth;
	}

	public double getMapHeight() {
		return mapHeight;
	}

	public void setMapHeight(double mapHeight) {
		this.mapHeight = mapHeight;
	}

	public int getMinSignToShow() {
		return minSignToShow;
	}

	public void setMinSignToShow(int minSigntoShow) {
		this.minSignToShow = minSigntoShow;
	}

	public int getMaxSign() {
		return maxSign;
	}

	public void setMaxSign(int maxsign) {
		this.maxSign = maxsign;
	}

	public int getMinSign() {
		return minSign;
	}

	public void setMinSign(int minsign) {
		this.minSign = minsign;
	}

	public double getRoomPercent() {
		return roomPercent;
	}

	public void setRoomPercent(double roomPercent) {
		this.roomPercent = roomPercent;
	}


	
}
